<?php

Class ReplyModel extends Model {

    protected $_validate = array(
        array('reply_type', 'require', '错误类型！'),
        array('reply_connect', 'require', '错误关联！'),
        array('reply_content', 'require', '请输入回复内容！'),
        array('reply_type', 'require', '错误类型！'),
    );
    protected $_auto = array(
        array('reply_user_id', 'get_user_id', 3, 'callback'),
        array('reply_user_name', 'get_user_name', 3, 'callback'),
        array('add_dateline', 'time', 1, 'function'),
        array('status', 0),
    );

    public function get_user_id() {
        return session('uid');
    }

    public function get_user_name() {
        return session('username');
    }

}

?>
